home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 05.zip / BS1 part 5 / IM_3 .adf / Exec / piarc.LZH / harlview.rexx < prev    next >
OS/2 REXX Batch file  |  1992-05-05  |  2KB  |  88 lines

  1. /*
  2.  * HARLVIEW.rexx
  3.  *
  4.  *  Written by: Barry Chalmers
  5.  * Last Update: May 6th, 1992
  6.  *         For: Black Belt Systems image processing series IM, IM F/c, and IP.
  7.  * ---------------------------------------------------------------------------
  8.  *    Revision: 1.00 - Initial release. Requires IM 9.11 or later.
  9.  */
  10. parse arg jackin dx1 dy1 dx2 dy2
  11.  
  12. /*
  13.  * Default display modes   - These need to be set to correct values
  14.  *                           corresponding to your HARLEQUIN
  15.  *                           display setup.
  16.  *                           (The PAL/NTSC is learned by asking IM.)
  17.  */
  18.     mode     = 0;  /* 0 is    740x576 (PAL) or    740x486 (NTSC)          */
  19.                    /* 1 is    832x576 (PAL) or    832x486 (NTSC)          */
  20.                    /* 2 is    910x576 (PAL) or    910x486 (NTSC)          */
  21.     lace     = 0;  /* 0 for NON-interlace     1 for Interlace             */
  22.  
  23.  
  24. if jackin = 'finish' then do
  25.   exit 0;
  26.   end;
  27.  
  28. /*
  29.  * open rexxsupport.library -- needed for some functions
  30.  */
  31. if ~show('L',"rexxsupport.library") then do
  32.   if addlib('rexxsupport.library',0,-30,0) then do
  33.       /* everything's ok */
  34.     end;
  35.   else do
  36.     say 'We Have A Library Problem, Unable To Load "rexxsupport.library"';
  37.     say 'Cannot operate script without this library - sorry!';
  38.     exit 10;
  39.     end;
  40.   end;
  41.  
  42. prtnme = 'IM_Port';
  43.  
  44.   /*
  45.    * This code attempts to read a file called "picmdpath" from REXX:
  46.    * If it can't find it, the script will assume that the commands
  47.    * associated with this PI Module are in "c:". If the file exists,
  48.    * the script will look in the path that is specified in the file.
  49.    * If you create this file, you MUST put a complete, correct path
  50.    * in it; if the commands are in a sub-directory, you have to put
  51.    * the trailing slash on the path (like, device:dir/).
  52.    * 
  53.    */
  54.   cmdpath = 'c:';
  55.   if open(fhandle,'rexx:picmdpath','read') then  /* open the file */
  56.     do
  57.       cmdpath = readln(fhandle);
  58.       call close(fhandle);  /* close the file    */
  59.     end
  60.  
  61. address(prtnme);
  62.  
  63. palntsc  = 1;  /* 0 for PAL   1 for NTSC                              */
  64. options results;
  65. 'pal';
  66. pal = result;
  67. options;
  68. if pal > 0 then palntsc = 0;
  69.  
  70. if jackin <= 0 then do
  71.   options results;
  72.   'jackin';
  73.   jackin = result;
  74.   options;
  75.   dx1 = -1;
  76.   dy1 = -1;
  77.   dx2 = -1;
  78.   dy2 = -1;
  79. end;
  80.  
  81. address command cmdpath||'harlview '||jackin||' '||dx1||' '||dy1||' '||dx2||' '||dy2||' '||palntsc||' '||mode||' '||lace;
  82. address(prtnme);
  83.  
  84. 'finish';
  85. address;
  86.  
  87. exit 0;
  88.